home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Frameworks
/
Grant's CGI Framework 1.0b14
/
Util
/
globals.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-12
|
3KB
|
121 lines
#pragma once
/*****
*
* globals.h
*
* This is a support file for "Grant's CGI Framework".
* Please see the license agreement that accompanies the distribution package
* for licensing details.
*
* Copyright ©1995,1996 by Grant Neufeld
* grant@acm.com
* http://arpp.carleton.ca/grant/
*
*****/
#include "MyConfiguration.h"
#include <Threads.h>
/*** GLOBAL DECLARATIONS ***/
#ifdef __MainSegment__
#define _GLOBAL_ /* local */
#else
#define _GLOBAL_ extern
#endif
/** QUICKDRAW **/
/* Symantec C++ for PPC requires qd to be defined */
#ifndef qd
#ifdef __SC__
#ifdef __powerc
_GLOBAL_ QDGlobals qd;
#endif
#endif
#endif
/** MEMORY **/
/* handle to emergency memory reserve. Used in MemoryFunc.c. IM-Memory 1-46 */
_GLOBAL_ Handle gEmergencyMemory;
/** PROCESS **/
_GLOBAL_ Boolean gQuit; /* application is set to quit */
_GLOBAL_ Boolean gFrontProcess; /* application is in the foreground */
_GLOBAL_ long gSleepTicks; /* sleep time for WaitNextEvent | threads when app is idle */
//moved to ProcessUtil.c: _GLOBAL_ long gSleepTicksBusy;/* sleep time for WaitNextEvent | threads when app is processing */
#if kCompileWithProcessFileSpec
_GLOBAL_ FSSpec gProcessFSSpec; /* the FSSpec for the application */
#endif
/** THREADS **/
_GLOBAL_ Boolean gThreadQuit; /* threads should quit now */
//•moved to vThreadMain in"ProcessUtil.c"
//_GLOBAL_ ThreadID gThreadMain; /* main application thread id */
_GLOBAL_ short gThreadTotal; /* # of threads other than main */
/** IDLE TIME QUIT **/
#if kCompileWithQuitOnLongIdle
_GLOBAL_ long gTimeLastAction;/* the time in ticks of the last action performed */
_GLOBAL_ Boolean gDoIdleQuit; /* whether to quit after period of inactivity */
_GLOBAL_ long gIdleTimeToQuit;/* idle time needed until quit set */
_GLOBAL_ Boolean gDoIdleQuitOnOpenApp; /* quit on idle after open app */
#endif
/** APPLE EVENTS **/
_GLOBAL_ AEIdleUPP gAEIdleUPP;
/* SCREEN RECTS */
#if kCompileWithForeground
_GLOBAL_ Rect gScreenRect; /* main monitor */
_GLOBAL_ Rect gGrayRgnRect; /* entire screen */
#endif
/* STRINGS */
_GLOBAL_ Str255 gVersionStr;
/* ERRORS */
_GLOBAL_ StringHandle gSystemErrorStr;
/* TOOLBOX MANAGERS AND FUNCTION CALLS AVAILABLE */
#if kCompileWithDragNDrop && kCompileWithForeground
_GLOBAL_ Boolean gHasDragNDrop; /* Drag Manager present */
#endif
#if kCompileWithThreadsOptional
_GLOBAL_ Boolean gHasThreadMgr; /* Thread Manager present */
#endif
#if kCompileWithForeground
_GLOBAL_ Boolean gHasColorQD; /* Color QuickDraw present */
#endif
/* PROFILER (CodeWarrior) */
#if __profile__ && __MWERKS__
_GLOBAL_ Boolean gProfileOn;
#endif
#ifdef _GLOBAL_
#undef _GLOBAL_
#endif
/***** EOF *****/